package com.ruoyi.recycleshop.dto;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
public class ShopExchangeQueryDTO implements Serializable {
    private static final long serialVersionUID = 2300963486687815311L;
    private Integer currentPage;
    private Integer pageSize;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date searchBegin;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date searchEnd;
    private Long shopId;

    public void setSearchEnd(Date searchEnd) {
        this.searchEnd = DateUtil.offsetSecond(searchEnd, 86399).toJdkDate();

    }
}
